#include<bits/stdc++.h>
using namespace std;
long long n,a[100001],i,ans,c,cc,aa,v[1000001],yqh=0;
bool o;
bool cmp(long long a1,long long b1){
    return a1>b1;
}
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%lld",&n);
    ans=n;
    for(i=1;i<=n;++i){
        scanf("%lld",&aa);
        ++v[aa];
        if(v[aa]==1){
            a[++c]=aa;
        }
    }
    sort(a+1,a+c+1);
    for(i=1;i<c;++i){
        ans-=min(v[a[i]]+cc,v[a[i+1]]);
        cc=max(yqh,v[a[i]]+cc-v[a[i+1]]);
    }
    printf("%lld",ans);
    return 0;
}
